CRPEJob::SetGroupCondition

Use CRPEJob::SetGroupCondition to set the condition of the grouping for the specified group section. This method can only replace the group condition for an existing group. It cannot create a new group. Use this method whenever you want to change the grouping at print time (for example, to print a report grouped in several different ways).

Syntax
BOOL SetGroupCondition (
        short sectionCode,
        const _TCHAR *conditionField,
        short condition,
        short sortDirection );
Parameters

sectionCode

Specifies the code for the group section for which you want to set the group condition. Use one of the following constants.


Constant Description


PEP_GROUPHEADER

Sets the group condition for the Group Header section.


PEP_GROUPFOOTER

Sets the group condition for the Group Footer section.

conditionField

Specifies a pointer to the field that triggers a summary whenever its value changes. Use the name of the field as indicated in the report file.

condition

Specifies the condition that needs to be met for Date and Boolean fields. For all field types (except Date and Boolean), use PEP_GC_ANYCHANGE as the condition parameter. Use one of the following constants for Date and Boolean field types.


Constant (Date fields only) Description


PEP_GC_DAILY

Triggers a grouping every time the date changes.


PEP_GC_WEEKLY

Triggers a grouping every time the date changes from one week to the next (a week runs from Sunday through Saturday).


PEP_GC_BIWEEKLY

Triggers a grouping every time the date changes from one two-week period to the next.


PEP_GC_SEMIMONTHLY

Triggers a grouping every time the date changes from one half-month period to the next.


PEP_GC_MONTHLY

Triggers a grouping every time the date changes from one month to the next.


PEP_GC_QUARTERLY

Triggers a grouping every time the date changes from one calendar quarter to the next.


PEP_GC_SEMIANNUALLY

Triggers a grouping every time the date changes from one half-year period to the next.


PEP_GC_ANNUALLY

Triggers a grouping every time the date changes from one year to the next.


Constant (Boolean fields only) Description


PEP_GC_TOYES

Triggers a grouping every time the sort-and-group-by field changes from No to Yes.


PEP_GC_TONO

Triggers a grouping every time the sort-and-group-by field changes from Yes to No.


PEP_GC_EVERYYES

Triggers a grouping every time the sort-and-group-by field value is Yes.


PEP_GC_EVERYNO

Triggers a grouping every time the sort-and-group-by field value is No.


PEP_GC_NEXTISYES

Triggers a grouping every time the next value in the sort-and-group-by field is Yes.


PEP_GC_NEXTISNO

Triggers a grouping every time the next value in the sort-and-group-by field is No.

sortDirection

Specifies one of the PEP_SF_XXX Sort Order Constants.

Returns


Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com